/**
 * Created by lenovo on 2016/3/16.
 */
package cc.openhome;
import java.util.Arrays;

public class ArrayCopyArray {
    public static void main(String[] args) {
        int[] scores1={67,54,56,67,87,87,98,65,45,75};
        int[] scores2=Arrays.copyOf(scores1,scores1.length);
        for(int score:scores2){
            System.out.printf("%3d",score);
        }
        System.out.println();
        scores2[0]=99;
        for(int score:scores1){
            System.out.printf("%3d",score);
        }
    }

}
